package com.example.paopao.consumer.memer.pojo.dto;

import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;
import java.io.Serializable;
import java.util.List;

@Data
public class ReleaseAddNewDTO implements Serializable {

    /*标题*/
    @NotBlank(message = "请提交标题")
    @Pattern(regexp = ".{5,20}",message = "请输入标题在5到20字符之间")
    private String title;

    /*地区*/
    @NotBlank(message = "请提交地区")
    private List<Long> district;

    /*地区*/
    @NotBlank(message = "请提交联系人")
    private String contacts;

    /*交易目的*/
    @NotBlank(message = "请提交交易目的")
    private List<Long> objective;

    /*联系电话*/
    @NotBlank(message = "请提有效手机号")
    @Pattern(regexp = "^[0-9]{11}$", message = "手机号格式不正确")
    private String phone;

    /*详情介绍*/
    @NotBlank(message = "请提交详情")
    private String detail;
}
